package com.china.produce.listener;

import com.china.produce.event.AddDataEvent;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName
 * @Author niujie
 * @Version
 * @Description
 * @CreateTime 2022/12/16
 */
@Component
public class MyApplicationListener  implements ApplicationListener<AddDataEvent> {


    @Override
    public void onApplicationEvent(AddDataEvent event) {
        System.out.println("add Data Event " + event.getSource().toString());
    }
}
